from pyspark import SparkConf, SparkContext

conf = SparkConf().setMaster("local[*]").setAppName("test_spark")
sc = SparkContext(conf=conf)

# RDD
rdd1 = sc.parallelize([1,2,3,4,5,6,7,8,9,10])
rdd2 = sc.parallelize((1,2,3,4,5,6,7,8,9,10))
rdd3 = sc.parallelize("abcdefg")
rdd4 = sc.parallelize({"a":1,"b":2})
print(rdd1.collect())
print(rdd2.collect())
print(rdd3.collect())
print(rdd4.collect())

rdd = sc.textFile("D://TEST/test1.xlsx")
print(rdd.collect())

sc.stop()